home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / MacMud / Sockets / makefile < prev    next >
Encoding:
Makefile  |  1992-03-25  |  4.8 KB  |  189 lines  |  [TEXT/MPS ]

  1. sockobj = "{obj}"socket:
  2.  
  3. #    socket library debug levels :
  4. #            0 none
  5. #            1 report fatal errors
  6. #            3 execution tracing, and other "essential" debugging info
  7. #            5 extremely verbose and customized debugging info
  8. #            7 add packet tracing
  9. #
  10.  
  11. COptions =  -d SOCK_DEBUG=0 ∂
  12.             -d SOCK_TCP_DEBUG=0 ∂
  13.             -d SOCK_UDP_DEBUG=0 ∂
  14.             -d SOCK_STDIO_DEBUG=0 ∂
  15.             -d SOCK_UTIL_DEBUG=0 ∂
  16.             -d NETDB_DEBUG=0 ∂
  17.             -d GLUE_DEBUG=0 ∂
  18.             -d TCP_PACKET_TRACE ∂
  19.             -u UDP_PACKET_TRACE ∂
  20.             -i "{MacTCP}cincludes:" ∂
  21.             -i "{UnixIncludes}" ∂
  22.             -sym full -mbg full -s socket
  23.             
  24. OBJS = "{Libraries}"Interface.o ∂
  25.            "{CLibraries}"Math.o ∂
  26.            "{Libraries}"Runtime.o ∂
  27.            "{CLibraries}"StdCLib.o ∂
  28.            "{CLibraries}"CSANELib.o ∂
  29.            "{UnixLib}"unixlib.c.o ∂
  30.            dprintf.c.o
  31.      
  32. MAP = -l -lf > map.dat
  33.  
  34. all ƒ socket.o host testtcpclient
  35.  
  36. alltests ƒ testnetdb ∂
  37.         testtcpclient ∂
  38.           testtcpserver ∂
  39.         testudpclient ∂
  40.         testglue 
  41. #      bug
  42. #      testspin
  43. #      tcpstats
  44.  
  45. clean ƒ
  46.     delete -i testnetdb testtcpclient testtcpserver testudpclient testglue bug testspin tcpstats
  47.  
  48. #########################################################################
  49.  
  50. SOCKET_OBJS =    socket.c.o ∂
  51.                 socket.udp.c.o ∂
  52.                 socket.tcp.c.o ∂
  53.                 socket.util.c.o ∂
  54.                 socket.stdio.c.o ∂
  55.                 netdb.c.o ∂
  56.                 herror.c.o ∂
  57.                 tcpglue.c.o ∂
  58.                 dnr.c.o 
  59.  
  60. socket.o ƒ {SOCKET_OBJS}
  61.     lib {SOCKET_OBJS} -o socket.o
  62.  
  63. socket.c.o ƒ        tcpglue.h  socket.internal.h
  64. socket.udp.c.o ƒ    tcpglue.h  socket.internal.h
  65. socket.tcp.c.o ƒ    tcpglue.h  socket.internal.h
  66. socket.util.c.o ƒ   tcpglue.h  socket.internal.h
  67. socket.stdio.c.o ƒ  tcpglue.h  socket.internal.h
  68. netdb.c.o ƒ         tcpglue.h  socket.internal.h
  69. tcpglue.c.o ƒ       tcpglue.h
  70.  
  71. #########################################################################
  72.  
  73. TEST_GLUE_SRCS = testglue.c
  74.  
  75. TEST_GLUE_OBJS = testglue.c.o tcpglue.c.o {OBJS}
  76.  
  77. testglue ƒ {TEST_GLUE_OBJS}
  78.     Link  -o testglue -t MPST -c 'MPS ' {TEST_GLUE_OBJS}
  79.     
  80. testglue.c.o ƒ tcpglue.h
  81.  
  82. #########################################################################
  83.  
  84. TEST_TCP_CLIENT_OBJS = testtcpclient.c.o socket.o {OBJS}
  85.  
  86. testtcpclient ƒ {TEST_TCP_CLIENT_OBJS}
  87.     Link  -o testtcpclient -t MPST -c 'MPS ' {TEST_TCP_CLIENT_OBJS}
  88.     
  89. testtcpclient.c.o ƒ tcpglue.h socket.internal.h
  90.  
  91.  
  92. #########################################################################
  93.  
  94. TEST_TCP_SERVER_OBJS = testtcpserver.c.o socket.o {OBJS}
  95.  
  96. testtcpserver ƒ {TEST_TCP_SERVER_OBJS}
  97.     Link  -o testtcpserver -t MPST -c 'MPS ' {TEST_TCP_SERVER_OBJS}
  98.     
  99. testtcpserver.c.o ƒ tcpglue.h socket.internal.h
  100.  
  101.  
  102. #########################################################################
  103.  
  104. TEST_UDP_CLIENT_OBJS = testudpclient.c.o socket.o {OBJS}
  105.  
  106. testudpclient ƒ {TEST_UDP_CLIENT_OBJS}
  107.     Link  -o testudpclient -t MPST -c 'MPS ' {TEST_UDP_CLIENT_OBJS}
  108.     
  109. testudpclient.c.o ƒ tcpglue.h socket.internal.h
  110.  
  111.  
  112. #########################################################################
  113.  
  114. TEST_UDP_SERVER_OBJS = testudpserver.c.o socket.o {OBJS}
  115.  
  116. testudpserver ƒ {TEST_UDP_SERVER_OBJS}
  117.     Link  -o testudpserver -t MPST -c 'MPS ' {TEST_UDP_SERVER_OBJS}
  118.     
  119. testudpserver.c.o ƒ tcpglue.h socket.internal.h
  120.  
  121.  
  122. #########################################################################
  123.  
  124. TEST_STDIO_OBJS = teststdio.c.o socket.o {OBJS}
  125.  
  126. teststdio ƒ {TEST_STDIO_OBJS}
  127.     Link  -o teststdio -t MPST -c 'MPS ' {TEST_STDIO_OBJS}
  128.     
  129. teststdio.c.o ƒ tcpglue.h socket.internal.h
  130.  
  131. #########################################################################
  132.  
  133. TEST_SPIN_OBJS = testspin.c.o socket.o {OBJS}
  134.  
  135. testspin ƒ {TEST_SPIN_OBJS}
  136.     Link  -o testspin -t MPST -c 'MPS ' {TEST_SPIN_OBJS}    
  137.     
  138. #########################################################################
  139.  
  140. STAT_OBJS = tcpstats.c.o socket.o {OBJS}
  141.  
  142. tcpstats ƒ {STAT_OBJS}
  143.     Link  -o tcpstats -t MPST -c 'MPS ' {STAT_OBJS}
  144.     
  145. tcpstats.c.o ƒ tcpglue.h
  146.     
  147. #########################################################################
  148.  
  149. NETDB_OBJS = testnetdb.c.o socket.o {OBJS}
  150.  
  151. testnetdb ƒ {NETDB_OBJS}
  152.     Link  -o testnetdb -t MPST -c 'MPS ' {NETDB_OBJS}
  153.     
  154. testnetdb.c.o ƒ tcpglue.h
  155.     
  156. #########################################################################
  157.  
  158. HOST_OBJS = host.c.o socket.o {OBJS}
  159.  
  160. host ƒ {HOST_OBJS}
  161.     Link  -o host -t MPST -c 'MPS ' {HOST_OBJS}
  162.     
  163. host.c.o ƒ tcpglue.h
  164.     
  165. #########################################################################
  166.  
  167. TEST_OBJS = test.c.o socket.o {OBJS}
  168.  
  169. test ƒ {TEST_OBJS}
  170.     Link  -o test -t MPST -c 'MPS ' {TEST_OBJS}
  171.     
  172. #########################################################################
  173.  
  174. BUG_OBJS = bug.c.o ∂
  175.            "{Libraries}"Interface.o ∂
  176.            "{CLibraries}"Math.o ∂
  177.            "{Libraries}"Runtime.o ∂
  178.            "{CLibraries}"StdCLib.o ∂
  179.            "{CLibraries}"CSANELib.o
  180.  
  181.  
  182. bug ƒ {BUG_OBJS}
  183.     Link  -o bug -t MPST -c 'MPS ' {BUG_OBJS}
  184.  
  185. #########################################################################
  186.  
  187. .c.o    ƒ    .c
  188.     c "{depDir}{default}.c" -o "{targDir}{default}.c.o" {COptions}
  189.